package com.example.searchdemo.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.example.searchdemo.entity.SourceNet;
import com.example.searchdemo.service.ISourceNetService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @author ShowFaker
 */
@RestController
@RequestMapping("/sourceNet")
@Api(value = "收银-BIS对接相关接口", tags = "收银-BIS对接相关接口")
@AllArgsConstructor
public class SourceNetController {

    @Autowired
    private ISourceNetService sourceNetService;

    @GetMapping("/getById")
    @ApiOperation(value = "根据id查询响应的网站")
    public R<SourceNet> getById(@RequestParam Long id) {
        R<SourceNet> response = new R<>();
        SourceNet sourceNet = sourceNetService.getById(id);
        response.setData(sourceNet);
        return response;
    }

}
